package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.数据字典表Model;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 *
 */
public interface 数据字典Repository extends JpaRepository<数据字典表Model, Integer>, JpaSpecificationExecutor<数据字典表Model> {
    @Query("select a from 数据字典表Model a where a.分类编码 = ?1 ORDER BY a.字典排序 asc")
    List<数据字典表Model> get数据字典表Models(String 分类编码);

    @Query("select a from 数据字典表Model a where a.字典名称 =?1")
    数据字典表Model get数据字典By名称(String 字典名称);

}
